enum Api {
  // 市场费用设置列表
  MarketCostsSetPage = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_MarketMoney_Set_List',

  // 添加费用
  AddMarketCosts = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_MarketMoney_Set_Insert',

  // 更新费用
  UpdateMarketCosts = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_MarketMoney_Set_Update',

  // 删除费用
  DeleteMarketCosts = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_MarketMoney_Set_Delete',

  // 费用主体列表
  CompanyList = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_CompanyList',

  // 费用分类列表
  CostsCategoryList = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_TypeExtendChildList',

  // 添加分类
  AddCostsCategory = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_Insert_TypeExtend',

  // 修改分类
  UpdateCostsCategory = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_Update_TypeExtend',

  // 分类详情
  CostsCategoryDetail = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_TypeExtend_Detail',

  // 删除分类
  DeleteCostsCategory = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_Delete_TypeExtend',

  // 市场费用分配详情
  MarketCostsAssignDetail = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_MarketMoney_Set_Detail',

  // 市场费用更新
  UpdateMarketCostsAssign = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_MarketMoney_Set_Subject_Update',

  // Bu总费用列表
  BuCostsPage = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_MarketMoney_Set_Child_List',

  // Bu总费用详情
  BuCostsDetail = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_MarketMoney_Set_Child_Detail',

  // Bu总费用更新
  UpdateBuCosts = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_MarketMoney_Set_Child_Update',

  // 预测列表
  PredictionPage = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/Post_Sales_MMV_List',

  // 费用预测信息加载
  PredictionDetail = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostVerifyDetail',

  // 礼包查询
  SupportPackageList = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostPackingList',

  // 获取品牌
  BrandList = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostBrandList',

  // 三大类列表查询
  AllTypeList = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostAllTypeList',

  // 查询公司下属区域
  CompanyChildrenList = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostBudGetList',

  // 费用预测提交
  SavePrediction = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostVerifyInsert',

  // 费用预测修改
  UpdatePrediction = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostVerifyUpdate',

  // 费用预测详情列表
  PredictionDetailList = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostProjectAuditList',

  // 费用预测审核
  PredictionReview = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostVerifyAudit',

  // 申请执行
  ApplyExecute = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostVerifyImplement',

  // 执行审核
  ExecuteReview = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostVerifyImplementAudit',

  // new费用预测详情列表
  PredictionDetailLists = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostMarketMoneyGroupDetailList',

  // new费用预测批量
  PredictionBatch = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostMarketMoneyGroupDetailList',

  // 费用预测核销申请
  PredictionCheck = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/MarketMoney_Check_Apply',

  // 核销审核
  PredictionCheckReview = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/MarketMoney_Check_Audit',

  // 撤销/删除
  PredictionDelete = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostVerifyDelete_F2',

  // 延期/取消
  PredictionCancel = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostVerifyCancel',

  // 再次提交
  PredictionRecommit = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/PostVerifyAgainSubmit_F2',

  // 费用类型加载
  LoadMoneyTypeList = '/Api/MF_ManagerFront/MF_MarketMoney_Verify/GetMoneyTypeList',

  // 审核挂起
  HoldReview = '/Api/MF_ManagerFront/MF_Home/PostAuditBlock'
}

export function useMarketCostsApi(vm) {
  const getMarketCostsSetPageList = (params: {}) => {
    return vm.$u.post(Api.MarketCostsSetPage, params);
  };

  const addMarketCosts = (params: {}) => {
    return vm.$u.post(Api.AddMarketCosts, params);
  };

  const updateMarketCosts = (params: {}) => {
    return vm.$u.post(Api.UpdateMarketCosts, params);
  };

  const deleteMarketCosts = (params: {}) => {
    return vm.$u.post(Api.DeleteMarketCosts, params);
  };

  const getCompanyList = (params: {}) => {
    return vm.$u.post(Api.CompanyList, params);
  };

  const getCostsCategoryList = (params: {}) => {
    return vm.$u.post(Api.CostsCategoryList, params);
  };

  const addCostsCategory = (params: {}) => {
    return vm.$u.post(Api.AddCostsCategory, params);
  };

  const updateCostsCategory = (params: {}) => {
    return vm.$u.post(Api.UpdateCostsCategory, params);
  };

  const deleteCostsCategory = (params: {}) => {
    return vm.$u.post(Api.DeleteCostsCategory, params);
  };

  const loadCostAssignDetail = (params: {}) => {
    return vm.$u.post(Api.MarketCostsAssignDetail, params);
  };

  const updateCostsAssign = (params: {}) => {
    return vm.$u.post(Api.UpdateMarketCostsAssign, params);
  };

  const getBuCostsPage = (params: {}) => {
    return vm.$u.post(Api.BuCostsPage, params);
  };

  const getBuCostsDetail = (params: {}) => {
    return vm.$u.post(Api.BuCostsDetail, params);
  };

  const updateBuCosts = (params: {}) => {
    return vm.$u.post(Api.UpdateBuCosts, params);
  };

  const getPredictionPage = (params: {}) => {
    return vm.$u.post(Api.PredictionPage, params);
  };

  const getPredictionDetail = (params: {}) => {
    return vm.$u.post(Api.PredictionDetail, params);
  };

  const getSupportPackageList = (params: {}) => {
    return vm.$u.post(Api.SupportPackageList, params);
  };

  const getMarketBrandList = (params: {}) => {
    return vm.$u.post(Api.BrandList, params);
  };

  const getMarketAllTypeList = (params: {}) => {
    return vm.$u.post(Api.AllTypeList, params);
  };

  const savePrediction = (params: {}) => {
    return vm.$u.post(Api.SavePrediction, params);
  };

  const updatePrediction = (params: {}) => {
    return vm.$u.post(Api.UpdatePrediction, params);
  };

  const getPredictionDetailList = (params: {}) => {
    return vm.$u.post(Api.PredictionDetailList, params);
  };

  const getPredictionDetailLists = (params: {}) => {
    return vm.$u.post(Api.PredictionDetailLists, params);
  };

  const reviewPrediction = (params: {}) => {
    return vm.$u.post(Api.PredictionReview, params);
  };

  const applyExecute = (params: {}) => {
    return vm.$u.post(Api.ApplyExecute, params);
  };

  const reviewExecute = (params: {}) => {
    return vm.$u.post(Api.ExecuteReview, params);
  };

  const applyCheck = (params: {}) => {
    return vm.$u.post(Api.PredictionCheck, params);
  };

  const reviewCheck = (params: {}) => {
    return vm.$u.post(Api.PredictionCheckReview, params);
  };

  const deletePrediction = (params: {}) => {
    return vm.$u.post(Api.PredictionDelete, params);
  };

  const cancelPrediction = (params: {}) => {
    return vm.$u.post(Api.PredictionCancel, params);
  };

  const recommitPrediction = (params: {}) => {
    return vm.$u.post(Api.PredictionRecommit, params);
  };

  const getCompanyChildrenList = (params: {}) => {
    return vm.$u.post(Api.CompanyChildrenList, params);
  };

  const getMoneyTypeList = (params: {}) => {
    return vm.$u.get(Api.LoadMoneyTypeList, params);
  };

  const holdReview = (params: {}) => {
    return vm.$u.post(Api.HoldReview, params);
  };

  return {
    getMarketCostsSetPageList,
    addMarketCosts,
    updateMarketCosts,
    deleteMarketCosts,
    getCompanyList,
    getCostsCategoryList,
    addCostsCategory,
    updateCostsCategory,
    deleteCostsCategory,
    loadCostAssignDetail,
    updateCostsAssign,
    getBuCostsPage,
    getBuCostsDetail,
    updateBuCosts,
    getPredictionPage,
    getPredictionDetail,
    getSupportPackageList,
    getMarketBrandList,
    getMarketAllTypeList,
    savePrediction,
    updatePrediction,
    getPredictionDetailList,

    reviewPrediction,

    applyExecute,

    reviewExecute,

    getPredictionDetailLists,

    applyCheck,
    reviewCheck,

    deletePrediction,
    cancelPrediction,

    recommitPrediction,
    getCompanyChildrenList,
    getMoneyTypeList,

    holdReview
  };
}
